package com.example.administrator.yuejian2.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.administrator.yuejian2.fragment.ClubFragment;
import com.example.administrator.yuejian2.fragment.CommentFragment;

public class ShareFragmentPagerAdapter extends FragmentPagerAdapter{

    private CommentFragment commentFragment;
    public ShareFragmentPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        commentFragment=new CommentFragment();
        return commentFragment;

    }
    @Override
    public CharSequence getPageTitle(int position) {     //返回Tab名字
        String name ="评论";
        return  name;
    }
    @Override
    public int getCount() {
        return 1;
    }
}
